package com.ruoyi.psi.base.warehouse.service;

import com.ruoyi.psi.base.warehouse.domain.*;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 仓库
 * 业务层
 */
public interface IWarehouseService {
    /**
     * 仓库查询
     * @param cond
     * @return
     */
    List<WarehouseDto> selectWarehouseList(WarehouseCond cond);

    /**
     * 按编号查询
     * @param warehouseId
     * @return
     */
    WarehouseDto selectWarehouseById(String warehouseId);

    /**
     * 仓库新增
     * @param warehouse
     * @return
     */
    int insertWarehouse(WarehouseDomain warehouse);

    /**
     * 仓库更新
     * @param warehouse
     * @return
     */
    int updateWarehouse(WarehouseDomain warehouse);

    /**
     * 更新仓库删除标志位
     * @param warehouse
     * @return
     */
    int updateWarehouseDeleteFlag(WarehouseDomain warehouse);

    /**
     * 仓库详细查询
     * @param cond
     * @return
     */
    List<WarehouseListDto> selectWarehouseListList(WarehouseCond cond);

    /**
     * 查询仓库对应的所有产品详细
     * @param warehouseId 仓库编号
     * @return
     */
    List<WarehouseListDto> selectWarehouseListListById(String warehouseId);

    /**
     * 查询仓库对应的指定产品详细
     * @param warehouseId 仓库编号
     * @return
     */
    WarehouseListDto selectWarehouseListById(String warehouseId, String produceId);

    /**
     * 仓库详细更新
     * @param warehouseList 仓库详细
     * @return
     */
    int updateWarehouseList(WarehouseListDomain warehouseList);

    /**
     * 查询产品的库存数量
     * @return
     */
    Map<String, Double> selectProductNumber(WarehouseCond cond);
}
